<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
<meta name="format-detection" content="telephone=no">
<meta name="HandheldFriendly" content="true" />
{php include $this->template('shoucecss');}
<style type="text/css">
.header { width: 100%; height: 50px; line-height: 50px; position: fixed; z-index: 1000; top: 0; left: 0; box-shadow: 0 0 2px 0px rgba(0,0,0,0.3),0 0 6px 2px rgba(0,0,0,0.15); }
.header .l { width: 50px; height: 50px; line-height: 50px; color: white; position: absolute; left: 0; top: 0; } 
.header .m { width: 100%; height: 50px; line-height: 50px; text-align: center; color: white; font-size: 18px; } 
.header .r { width: 50px; height: 50px; line-height: 50px; position: absolute; right: 0; top: 0; } 
.mainColor { background: #14c682 !important; } 
.header .l a { font-size: 18px; color: white; display: block; width: 100%; height: 100%; text-align: center; }
.head_til img{width: 25px;height: 25px;display: inline-block;float: left;border-radius: 40px;}
body {background-color: #E7FAFF;}
.bottom_control_row .prev_btn1 {margin: 15px 5px 15px 35px;float: left;width: 100px;background-color: #e5457f;border-radius: 3px;line-height: 35px;height: 35px;text-align: center;}
.bottom_control_row .prev_btn1 a, .bottom_control_row .next_btn a {color: #fff;}
.bottom_control_row .prev_btn2 {margin: 15px 5px 15px 35px;float: left;width: 100px;background-color: #e5457f;border-radius: 3px;line-height: 35px;height: 35px;text-align: center;}
.bottom_control_row .prev_btn2 a, .bottom_control_row .next_btn a {color: #fff;}
</style>
<script type="text/javascript" src="{MODULE_URL}public/mobile/js/jquery-1.11.3.min.js?v=4.8"></script>
{php include $this->template('port');}
<title>{$school['title']}</title>
</head>
<body>
<div class="header mainColor">
	<div class="l">
		<a class="backOff" style="background:url({OSSURL}public/mobile/img/ic_arrow_left_48px_white.svg) no-repeat;background-size: 55% 55%;background-position: 50%;" href="{php echo $this->createMobileUrl('sclistforxs', array('schoolid' => $schoolid,'userid' => $it['id']), true)}"></a>
	</div>
	<div class="m">
		<a><span style="font-size: 18px">点评学生</span></a>
	</div>
</div>
<div class="All">
<div class="top_height_blank"></div>
<div class="manual_main1">
    <div class="manual_visible_box">
        <div class="manual_til_img">
            {if $_GPC['type'] == 'school'}<img src="{php echo tomedia($toppic['top1'])}" />{/if}
        </div>
        <div class="manual_main_box2">
            <div class="head_til"><img src="{if $student['icon']}{php echo tomedia($student['icon'])}{else}{php echo tomedia($school['spic'])}{/if}">&nbsp;{$student['s_name']}</div>
            {if $_GPC['op'] =='edite'}
				<ul class="manual_baby_situation_ul">
					{loop $list $row}
						<li>
							<div class="li_block_1">{$row['title']}</div>
							<div class="li_block_2" record_uid="{$row['id']}">
								{if $row['icon1']}<div class="situation_level1 {if !$row['iconlevel']}on{else}{if $row['iconlevel'] ==1}on{/if}{/if}" icon_index="1" style="background-image: url({php echo tomedia($row['icon1'])});"></div>{/if}
								{if $row['icon2']}<div class="situation_level1 {if $row['iconlevel'] ==2}on{/if}" icon_index="2" style="background-image: url({php echo tomedia($row['icon2'])});"></div>{/if}
								{if $row['icon3']}<div class="situation_level1 {if $row['iconlevel'] ==3}on{/if}" icon_index="3" style="background-image: url({php echo tomedia($row['icon3'])});"></div>{/if}
								{if $row['icon4']}<div class="situation_level1 {if $row['iconlevel'] ==4}on{/if}" icon_index="4" style="background-image: url({php echo tomedia($row['icon4'])});"></div>{/if}
								{if $row['icon5']}<div class="situation_level1 {if $row['iconlevel'] ==5}on{/if}" icon_index="5" style="background-image: url({php echo tomedia($row['icon5'])});"></div>{/if}
							</div>
						</li>
					{/loop}	
				</ul>
				<div class="parent_evaluation_box">
					<textarea placeholder="说说学生在家表现" id="eval_text" >{$mypl['jzword']}</textarea>
					<div class="clear1"></div>
				</div>
			{else if $_GPC['op'] =='check'}
				<ul class="manual_baby_situation_ul">
				{loop $list1 $row}
					<ul class="manual_baby_situation_ul">
						<li>
							<div class="li_block">{$row['title']}</div>
							<div class="li_block">
								<div class="situation_level1" style="background-image: url({php echo tomedia($row['icon'])})">{$row['icontitle']}</div>
							</div>
						</li>               
					</ul>
				{/loop}
				</ul>		
				<div class="blank"></div>
				{loop $allpl $row}
					<div class="evaluation_box evaluation_box2">
						<div class="evaluation_photo">
							<img src="{if $row['thumb']}{php echo tomedia($row['thumb'])}{else}{php echo tomedia($school['tpic'])}{/if}">
						</div>
						<div class=" evaluation_box_text2">
							<div class="evaluation_box_til3">{$row['tname']}</div>
							<div class="time">{$row['time']}前</div>
						</div>
						<div class="blank"></div>
						<div class="evaluation_box_content">{$row['tword']}{$row['jzword']}</div>
					</div>
				{/loop}
				<div class="blank"></div>	
				{if !$mypl['jzword']}<a href="{php echo $this->createMobileUrl('scforxs', array('schoolid' => $schoolid,'sid' => $sid,'scid' => $scid,'setid' => $setid, 'op' => 'edite'), true)}" class="white_btn2 edit-btn" id="add_comment" >我也说两句</a>{/if}				
			{else}
				<ul class="manual_baby_situation_ul">
					{loop $list $row}
						<li>
							<div class="li_block_1">{$row['title']}</div>
							<div class="li_block_2" record_uid="{$row['id']}">
								{if $row['icon1']}<div class="situation_level1 on" icon_index="1" style="background-image: url({php echo tomedia($row['icon1'])});"></div>{/if}
								{if $row['icon2']}<div class="situation_level1 " icon_index="2" style="background-image: url({php echo tomedia($row['icon2'])});"></div>{/if}
								{if $row['icon3']}<div class="situation_level1 " icon_index="3" style="background-image: url({php echo tomedia($row['icon3'])});"></div>{/if}
								{if $row['icon4']}<div class="situation_level1 " icon_index="4" style="background-image: url({php echo tomedia($row['icon4'])});"></div>{/if}
								{if $row['icon5']}<div class="situation_level1 " icon_index="5" style="background-image: url({php echo tomedia($row['icon5'])});"></div>{/if}
							</div>
						</li>
					{/loop}	
				</ul>
				<div class="parent_evaluation_box">
					<textarea placeholder="说说学生在家表现" id="eval_text" ></textarea>
					<div class="clear1"></div>
				</div>
			{/if}
            <div class="blank"></div>
            <div class="small_blank"></div>
        </div>
    </div>
{if $_GPC['op'] =='check'}
    <div class="bottom_control_row">
		 {if $_GPC['type'] =='home'}
			<div class="prev_btn2"><a href="{php echo $this->createMobileUrl('scforxs', array('schoolid' => $schoolid,'sid' => $sid,'scid' => $scid,'setid' => $setid, 'op' => 'check', 'type' => 'school'), true)}">在校情况</a></div>
		 {/if}	
		 {if $_GPC['type'] =='school' || !$_GPC['type']}
			<div class="prev_btn2"><a href="{php echo $this->createMobileUrl('scforxs', array('schoolid' => $schoolid,'sid' => $sid,'scid' => $scid,'setid' => $setid, 'op' => 'check', 'type' => 'home'), true)}">在家情况</a></div>		 
		 {/if}
        <div class="next_btn blue_bg"><a href="{php echo $this->createMobileUrl('scforxs', array('schoolid' => $schoolid,'sid' => $sid,'scid' => $scid,'setid' => $setid, 'op' => 'edite'), true)}">修改家情况</a></div>
    </div>
{else if $_GPC['op'] =='edite'}
    <div class="bottom_control_row">
            <div class="prev_btn1" type="prev"><a href="javascript:void(0);">保存</a></div>
        <div class="next_btn blue_bg"><a href="javascript:history.go(-1);">返回</a></div>
    </div>
{else}
    <div class="bottom_control_row">
            <div class="prev_btn" type="prev"><a href="javascript:void(0);">保存</a></div>
        <div class="next_btn blue_bg"><a href="javascript:history.go(-1);">返回</a></div>
    </div>	
{/if}	
</div>
<div class="clear"></div>
</div>
</body>
</html>
<script>
$(".manual_baby_situation_ul").on("click", ".li_block_2 div", function () {
	$(this).addClass("on").siblings("div").removeClass("on");
})

$(".prev_btn").on("click", function () {
	var comment = iphone_emoji_filter($.trim($("#eval_text").val()));
	var performance = "";
	$(".manual_baby_situation_ul li").each(function () {
		performance += $(this).find(".li_block_2").attr("record_uid") + "_" + $(this).find(".li_block_2 .on").attr("icon_index")+",";
	});
	var type = $(this).attr("type");
	$.ajax({
		url: "{php echo $this->createMobileUrl('scforxs', array('schoolid' => $schoolid,'op' => 'savedata'), true)}",
		data: { comment: comment, performance: performance, sid: "{$it['sid']}", scid: "{$scid}", setid: "{$setid}" , tid: "{$it['tid']}", userid: "{$it['id']}", weid: "{$weid}"},
		type: "post",
		dataType:"json",
		success: function (data) {
			jTips(data.info, function () {
				if (data.status == 1) {
					window.location.href = "{php echo $this->createMobileUrl('sclistforxs', array('schoolid' => $schoolid,'userid' => $it['id']), true)}";
				}
			});		
		}
	});
});
$(".prev_btn1").on("click", function () {
	var comment = iphone_emoji_filter($.trim($("#eval_text").val()));
	var performance = "";
	$(".manual_baby_situation_ul li").each(function () {
		performance += $(this).find(".li_block_2").attr("record_uid") + "_" + $(this).find(".li_block_2 .on").attr("icon_index")+",";
	});
	var type = $(this).attr("type");
	$.ajax({
		url: "{php echo $this->createMobileUrl('scforxs', array('schoolid' => $schoolid,'op' => 'updata'), true)}",
		data: { comment: comment, performance: performance, sid: "{$it['sid']}", scid: "{$scid}", setid: "{$setid}" , tid: "{$it['tid']}", userid: "{$it['id']}", weid: "{$weid}"},
		type: "post",
		dataType:"json",
		success: function (data) {
			jTips(data.info, function () {
				if (data.status == 1) {
					window.location.href = "{php echo $this->createMobileUrl('sclistforxs', array('schoolid' => $schoolid,'userid' => $it['id']), true)}";
				}
			});		
		}
	});
});
</script>
